<link rel="stylesheet" href="resources/weui/dist/style/weui.min.css"/>

<div style="background-color: white" id="wrapper">
	<form action="index.php/courtannounce/list" method="post" id="court_ann_form">
		<div class="weui_cells">
			<div class="weui_cell weui_cell_select weui_select_before">
				<div class="weui_cell_bd ">
					<label class="weui_label">法院</label>
				</div>
				<div class="weui_cell_hd weui_cell_primary">
					<select class="weui_select" name="cbfy" id="cbfy">
						<option value="全部" <?php if ($searchsel['cbfy']=='全部'){
							echo "selected='selected'";
						} ?>>全部</option>
						<?php foreach($courts as $court): ?>
						<option value="<?php echo $court['id'] ?>"
								<?php
						if ($searchsel['cbfy']==$court['id']){
							echo "selected='selected'";
						}

						?>"><?php echo $court['courtname']?></option>
						<?php endforeach;?>
					</select>
				</div>
			</div>
		</div>
		<fieldset>
			<legend></legend>
			<select name="search_key" id="search_key" value="<?php echo $searchsel['search_key'] ?>" >
				<option value="" <?php if ($searchsel['search_key']==''){
					echo "selected='selected'";
				} ?> >全部</option>
				<option value="YG" <?php if ($searchsel['search_key']=='YG'){
					echo "selected='selected'";
				} ?>>原告</option>
				<option value="BG" <?php if ($searchsel['search_key']=='BG'){
					echo "selected='selected'";
				} ?>>被告</option>
				<option value="SPZ" <?php if ($searchsel['search_key']=='SPZ'){
					echo "selected='selected'";
				} ?>>审判长</option>
			</select>
			<input type="text" id="search_val" placeholder="" value="<?php
			 	if($searchsel['search_key']=='全部'){
					echo '';
				}else if($searchsel['search_key']=='YG'){
					echo $searchsel['yg'];
				}else if($searchsel['search_key']=='BG'){
					echo $searchsel['bg'];
				}
				else if($searchsel['search_key']=='SPZ'){
					echo $searchsel['spz'];
				}
			?>"/>
			<input type="text" style="display: none" name="yg" value="<?php echo $searchsel['yg']; ?>"/>
<!--			<input type="text" style="display: none" name="cbfy" value="--><?php //echo $searchsel['cbfy']; ?><!--"/>-->
			<input type="text" style="display: none" name="bg" value="<?php echo $searchsel['bg']; ?>"/>
			<input type="text" style="display: none" name="spz" value="<?php echo $searchsel['spz']; ?>"/>

<!--			<input type="button" id="search_btn" vaue="搜索"/>-->
			<div class="bd spacing" style="float: right">
				<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_primary" id="search_btn">搜索</a>
				</div>
		</fieldset>

	</form>

	<div class="weui_cells_title"><?php echo $title ?></div>
	<?php if (count($court_announces)==0){
		echo "<h3>暂时没有查询到相关信息！</h3>";
	}
	 else if (count($court_announces->list)==0){ ?>

	<h3>暂时没有查询到相关信息！</h3>
	<?php }else{ ?>
		 <input type="text" style="display: none" id="totalcount" value="<?php echo $court_announces->total; ?>"/>
	<?php foreach ($court_announces->list as $item):  ?>

	<div class="weui_cells_title" style="background-color: #98dbcc"><p><?php echo $item->AH ?></p></div>
	<div class="weui_cells weui_cells_access">
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>开庭时间</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->KTRQ ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>排期日期</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->PQRQ ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>审理法院</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->FY ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>审理法庭</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->FT ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>承办部门</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->CBBM ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>审判长</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->SPZ ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>原告</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right;padding-left: 15px;" >
				<p><?php echo  $item->YG ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>被告</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right;padding-left: 15px;" >
				<p><?php echo  $item->BG ?></p>
			</div>
		</div>
		<div class="weui_cell"  >
			<div class="weui_cell_bd " >
				<p>案由</p>
			</div>
			<div class="weui_cell_bd weui_cell_primary KTRQ" style="text-align: right" >
				<p><?php echo  $item->AY ?></p>
			</div>
		</div>
	</div>
		<?php endforeach; ?>
	<?php } ?>
</div>
<div class="weui_cells" style="display: none" id="loadingInfo">
	<div  class="weui_cell">
		<div class="weui_cell_bd " >
			<p>数据加载中</p>
		</div>
	</div>
</div>
<script src="resources/js/court_announce.js"></script>
